﻿using System;
using System.Data;

using Wicresoft.Common;

namespace Wicresoft.JDPostBoard.Entity
{
    [Table("vwVehicleApply", null, "JDPB.ConnectionString")]
    public class vwVehicleApply : ViewInfo
    {
        #region SQL column name consts
        public const string SQLCOL_ID = "ID";
        public const string SQLCOL_VEHICLEID = "VehicleID";
        public const string SQLCOL_STARTDATE = "StartDate";
        public const string SQLCOL_STARTTIME = "StartTime";
        public const string SQLCOL_ENDDATE = "EndDate";
        public const string SQLCOL_ENDTIME = "EndTime";
        public const string SQLCOL_PURPOSE = "Purpose";
        public const string SQLCOL_DESTINATION = "Destination";
        public const string SQLCOL_PEOPCOUNT = "PeopCount";
        public const string SQLCOL_NOTES = "Notes";
        public const string SQLCOL_APPLICANT = "Applicant";
        public const string SQLCOL_APPLICANTNAME = "ApplicantName";
        public const string SQLCOL_GROUPID = "GroupID";
        public const string SQLCOL_GROUPNAME = "GroupName";
        public const string SQLCOL_APPLYDATE = "ApplyDate";
        public const string SQLCOL_STATUS = "Status";
        public const string SQLCOL_AUDITUSERID = "AuditUserID";
        public const string SQLCOL_AUDITUSERNAME = "AuditUserName";
        public const string SQLCOL_AUDITTIME = "AuditTime";
        public const string SQLCOL_ORIGINID = "OriginID";
        public const string SQLCOL_REMARK1 = "Remark1";
        public const string SQLCOL_REMARK2 = "Remark2";
        public const string SQLCOL_REMARK3 = "Remark3";
        public const string SQLCOL_DRIVERID = "DriverID";
        public const string SQLCOL_DISTANCE = "Distance";
        public const string SQLCOL_KILOMETER = "Kilometer";
        public const string SQLCOL_KILOMETERMONEY = "KilometerMoney";
        public const string SQLCOL_WAITMONEY = "WaitMoney";
        public const string SQLCOL_MONEY = "Money";
        public const string SQLCOL_TICKETMONEY = "TicketMoney";
        public const string SQLCOL_WAITALLOWANCE = "WaitAllowance";
        public const string SQLCOL_ALLOWANCE = "Allowance";
        public const string SQLCOL_YCLX = "Yclx";
        public const string SQLCOL_COMMENTS = "Comments";
        public const string SQLCOL_VEHICLETYPE = "VehicleType";
        public const string SQLCOL_VEHICLENO = "VehicleNo";
        public const string SQLCOL_VEHICLENAME = "VehicleName";
        public const string SQLCOL_SEATSCOUNT = "SeatsCount";
        public const string SQLCOL_PICTURE = "Picture";
        public const string SQLCOL_CONSERVATOR = "Conservator";
        public const string SQLCOL_CONSERVATORNAME = "ConservatorName";
        public const string SQLCOL_DESCRIPTION = "Description";
        public const string SQLCOL_FLAG = "Flag";
        public const string SQLCOL_USEDATECN = "UseDateCN";
        public const string SQLCOL_VEHICLETYPECN = "VehicleTypeCN";
        public const string SQLCOL_VEHICLEFLAGCN = "VehicleFlagCN";
        public const string SQLCOL_STATUSCN = "StatusCN";
        public const string SQLCOL_DRIVERNAME = "DriverName";

        public const string SQLCOL_STARTADDRESS = "StartAddress";

        public const string SQLCOL_LXR = "Lxr";
        public const string SQLCOL_LXFS = "Lxfs";
        public const string SQLCOL_CH = "Ch";
        #endregion


        #region Contructors
        /// <summary>
        /// Construct empty entity
        /// </summary>
        public vwVehicleApply() { }

        #endregion

        public override void Init(DataRow row)
        {
            ID = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_ID]);
            VehicleID = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_VEHICLEID]);
            StartDate = (DateTime)ObjectType.DateTimeTypeHelper.Read(row[SQLCOL_STARTDATE]);
            StartTime = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_STARTTIME]);
            EndDate = (DateTime)ObjectType.DateTimeTypeHelper.Read(row[SQLCOL_ENDDATE]);
            EndTime = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_ENDTIME]);
            Purpose = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_PURPOSE]);
            Destination = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_DESTINATION]);
            PeopCount = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_PEOPCOUNT]);
            Notes = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_NOTES]);
            Applicant = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_APPLICANT]);
            ApplicantName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_APPLICANTNAME]);
            GroupID = (Guid)ObjectType.GuidTypeHelper.Read(row[SQLCOL_GROUPID]);
            GroupName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_GROUPNAME]);
            ApplyDate = (DateTime)ObjectType.DateTimeTypeHelper.Read(row[SQLCOL_APPLYDATE]);
            Status = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_STATUS]);
            AuditUserID = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_AUDITUSERID]);
            AuditUserName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_AUDITUSERNAME]);
            AuditTime = (DateTime)ObjectType.DateTimeTypeHelper.Read(row[SQLCOL_AUDITTIME]);
            OriginID = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_ORIGINID]);
            Remark1 = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_REMARK1]);
            Remark2 = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_REMARK2]);
            Remark3 = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_REMARK3]);
            DriverID = (long)ObjectType.LongTypeHelper.Read(row[SQLCOL_DRIVERID]);
            Distance = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_DISTANCE]);
            Kilometer = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_KILOMETER]);
            KilometerMoney = (decimal)ObjectType.DecimalTypeHelper.Read(row[SQLCOL_KILOMETERMONEY]);
            WaitMoney = (decimal)ObjectType.DecimalTypeHelper.Read(row[SQLCOL_WAITMONEY]);
            Money = (decimal)ObjectType.DecimalTypeHelper.Read(row[SQLCOL_MONEY]);
            TicketMoney = (decimal)ObjectType.DecimalTypeHelper.Read(row[SQLCOL_TICKETMONEY]);
            WaitAllowance = (decimal)ObjectType.DecimalTypeHelper.Read(row[SQLCOL_WAITALLOWANCE]);
            Allowance = (decimal)ObjectType.DecimalTypeHelper.Read(row[SQLCOL_ALLOWANCE]);
            Yclx = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_YCLX]);
            Comments = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_COMMENTS]);
            VehicleType = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_VEHICLETYPE]);
            VehicleNo = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_VEHICLENO]);
            VehicleName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_VEHICLENAME]);
            SeatsCount = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_SEATSCOUNT]);
            Picture = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_PICTURE]);
            Conservator = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_CONSERVATOR]);
            ConservatorName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_CONSERVATORNAME]);
            Description = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_DESCRIPTION]);
            Flag = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_FLAG]);
            UseDateCN = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_USEDATECN]);
            VehicleTypeCN = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_VEHICLETYPECN]);
            VehicleFlagCN = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_VEHICLEFLAGCN]);
            StatusCN = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_STATUSCN]);
            DriverName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_DRIVERNAME]);

            StartAddress = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_STARTADDRESS]);

            Lxr = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_LXR]);
            Lxfs = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_LXFS]);
            Ch = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_CH]);
        }

        #region Properties
        #region Property <int> ID
        [Property("ID", 4, SqlDbType.Int, false, false)]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        private int _ID = int.MinValue;
        #endregion

        #region Property <int> VehicleID
        [Property("VehicleID", 4, SqlDbType.Int, false, false)]
        public int VehicleID
        {
            get { return _VehicleID; }
            set { _VehicleID = value; }
        }
        private int _VehicleID = int.MinValue;
        #endregion

        #region Property <DateTime> StartDate
        [Property("StartDate", 16, SqlDbType.DateTime, false, false)]
        public DateTime StartDate
        {
            get { return _StartDate; }
            set { _StartDate = value; }
        }
        private DateTime _StartDate = DateTime.MinValue;
        #endregion

        #region Property <string> StartTime
        [Property("StartTime", 20, SqlDbType.NVarChar, false, false)]
        public string StartTime
        {
            get { return _StartTime; }
            set { _StartTime = value; }
        }
        private string _StartTime = null;
        #endregion

        #region Property <DateTime> EndDate
        [Property("EndDate", 16, SqlDbType.DateTime, false, false)]
        public DateTime EndDate
        {
            get { return _EndDate; }
            set { _EndDate = value; }
        }
        private DateTime _EndDate = DateTime.MinValue;
        #endregion

        #region Property <string> EndTime
        [Property("EndTime", 20, SqlDbType.NVarChar, false, false)]
        public string EndTime
        {
            get { return _EndTime; }
            set { _EndTime = value; }
        }
        private string _EndTime = null;
        #endregion

        #region Property <string> Purpose
        [Property("Purpose", 100, SqlDbType.NVarChar, false, false)]
        public string Purpose
        {
            get { return _Purpose; }
            set { _Purpose = value; }
        }
        private string _Purpose = null;
        #endregion

        #region Property <string> Destination
        [Property("Destination", 100, SqlDbType.NVarChar, false, false)]
        public string Destination
        {
            get { return _Destination; }
            set { _Destination = value; }
        }
        private string _Destination = null;
        #endregion

        #region Property <int> PeopCount
        [Property("PeopCount", 4, SqlDbType.Int, false, false)]
        public int PeopCount
        {
            get { return _PeopCount; }
            set { _PeopCount = value; }
        }
        private int _PeopCount = int.MinValue;
        #endregion

        #region Property <string> Notes
        [Property("Notes", 1000, SqlDbType.NVarChar, false, false)]
        public string Notes
        {
            get { return _Notes; }
            set { _Notes = value; }
        }
        private string _Notes = null;
        #endregion

        #region Property <string> Applicant
        [Property("Applicant", 40, SqlDbType.NVarChar, false, false)]
        public string Applicant
        {
            get { return _Applicant; }
            set { _Applicant = value; }
        }
        private string _Applicant = null;
        #endregion

        #region Property <string> ApplicantName
        [Property("ApplicantName", 100, SqlDbType.NVarChar, false, false)]
        public string ApplicantName
        {
            get { return _ApplicantName; }
            set { _ApplicantName = value; }
        }
        private string _ApplicantName = null;
        #endregion

        #region Property <Guid> GroupID
        [Property("GroupID", 16, SqlDbType.UniqueIdentifier, false, false)]
        public Guid GroupID
        {
            get { return _GroupID; }
            set { _GroupID = value; }
        }
        private Guid _GroupID = Guid.Empty;
        #endregion

        #region Property <string> GroupName
        [Property("GroupName", 100, SqlDbType.NVarChar, false, false)]
        public string GroupName
        {
            get { return _GroupName; }
            set { _GroupName = value; }
        }
        private string _GroupName = null;
        #endregion

        #region Property <DateTime> ApplyDate
        [Property("ApplyDate", 16, SqlDbType.DateTime, false, false)]
        public DateTime ApplyDate
        {
            get { return _ApplyDate; }
            set { _ApplyDate = value; }
        }
        private DateTime _ApplyDate = DateTime.MinValue;
        #endregion

        #region Property <string> Status
        [Property("Status", 1, SqlDbType.Char, false, false)]
        public string Status
        {
            get { return _Status; }
            set { _Status = value; }
        }
        private string _Status = null;
        #endregion

        #region Property <string> AuditUserID
        [Property("AuditUserID", 40, SqlDbType.NVarChar, false, false)]
        public string AuditUserID
        {
            get { return _AuditUserID; }
            set { _AuditUserID = value; }
        }
        private string _AuditUserID = null;
        #endregion

        #region Property <string> AuditUserName
        [Property("AuditUserName", 100, SqlDbType.NVarChar, false, false)]
        public string AuditUserName
        {
            get { return _AuditUserName; }
            set { _AuditUserName = value; }
        }
        private string _AuditUserName = null;
        #endregion

        #region Property <DateTime> AuditTime
        [Property("AuditTime", 16, SqlDbType.DateTime, false, false)]
        public DateTime AuditTime
        {
            get { return _AuditTime; }
            set { _AuditTime = value; }
        }
        private DateTime _AuditTime = DateTime.MinValue;
        #endregion

        #region Property <int> OriginID
        [Property("OriginID", 4, SqlDbType.Int, false, false)]
        public int OriginID
        {
            get { return _OriginID; }
            set { _OriginID = value; }
        }
        private int _OriginID = int.MinValue;
        #endregion

        #region Property <string> Remark1
        [Property("Remark1", 200, SqlDbType.NVarChar, false, false)]
        public string Remark1
        {
            get { return _Remark1; }
            set { _Remark1 = value; }
        }
        private string _Remark1 = null;
        #endregion

        #region Property <int> Remark2
        [Property("Remark2", 4, SqlDbType.Int, false, false)]
        public int Remark2
        {
            get { return _Remark2; }
            set { _Remark2 = value; }
        }
        private int _Remark2 = int.MinValue;
        #endregion

        #region Property <string> Remark3
        [Property("Remark3", 200, SqlDbType.NVarChar, false, false)]
        public string Remark3
        {
            get { return _Remark3; }
            set { _Remark3 = value; }
        }
        private string _Remark3 = null;
        #endregion

        #region Property <long> DriverID
        [Property("DriverID", 8, SqlDbType.BigInt, false, false)]
        public long DriverID
        {
            get { return _DriverID; }
            set { _DriverID = value; }
        }
        private long _DriverID = long.MinValue;
        #endregion

        #region Property <string> Distance
        [Property("Distance", 20, SqlDbType.NVarChar, false, false)]
        public string Distance
        {
            get { return _Distance; }
            set { _Distance = value; }
        }
        private string _Distance = null;
        #endregion

        #region Property <int> Kilometer
        [Property("Kilometer", 4, SqlDbType.Int, false, false)]
        public int Kilometer
        {
            get { return _Kilometer; }
            set { _Kilometer = value; }
        }
        private int _Kilometer = int.MinValue;
        #endregion

        #region Property <decimal> KilometerMoney
        [Property("KilometerMoney", 21, SqlDbType.Money, false, false)]
        public decimal KilometerMoney
        {
            get { return _KilometerMoney; }
            set { _KilometerMoney = value; }
        }
        private decimal _KilometerMoney = decimal.MinValue;
        #endregion

        #region Property <decimal> WaitMoney
        [Property("WaitMoney", 21, SqlDbType.Money, false, false)]
        public decimal WaitMoney
        {
            get { return _WaitMoney; }
            set { _WaitMoney = value; }
        }
        private decimal _WaitMoney = decimal.MinValue;
        #endregion

        #region Property <decimal> Money
        [Property("Money", 21, SqlDbType.Money, false, false)]
        public decimal Money
        {
            get { return _Money; }
            set { _Money = value; }
        }
        private decimal _Money = decimal.MinValue;
        #endregion

        #region Property <decimal> TicketMoney
        [Property("TicketMoney", 21, SqlDbType.Money, false, false)]
        public decimal TicketMoney
        {
            get { return _TicketMoney; }
            set { _TicketMoney = value; }
        }
        private decimal _TicketMoney = decimal.MinValue;
        #endregion

        #region Property <decimal> WaitAllowance
        [Property("WaitAllowance", 21, SqlDbType.Money, false, false)]
        public decimal WaitAllowance
        {
            get { return _WaitAllowance; }
            set { _WaitAllowance = value; }
        }
        private decimal _WaitAllowance = decimal.MinValue;
        #endregion

        #region Property <decimal> Allowance
        [Property("Allowance", 21, SqlDbType.Money, false, false)]
        public decimal Allowance
        {
            get { return _Allowance; }
            set { _Allowance = value; }
        }
        private decimal _Allowance = decimal.MinValue;
        #endregion

        #region Property <string> Comments
        [Property("Comments", 50, SqlDbType.VarChar, false, false)]
        public string Comments
        {
            get { return _Comments; }
            set { _Comments = value; }
        }
        private string _Comments = null;
        #endregion

        #region Property <string> Yclx
        [Property("Yclx", 50, SqlDbType.VarChar, false, false)]
        public string Yclx
        {
            get { return _Yclx; }
            set { _Yclx = value; }
        }
        private string _Yclx = null;
        #endregion

        #region Property <int> VehicleType
        [Property("VehicleType", 4, SqlDbType.Int, false, false)]
        public int VehicleType
        {
            get { return _VehicleType; }
            set { _VehicleType = value; }
        }
        private int _VehicleType = int.MinValue;
        #endregion

        #region Property <string> VehicleNo
        [Property("VehicleNo", 20, SqlDbType.NVarChar, false, false)]
        public string VehicleNo
        {
            get { return _VehicleNo; }
            set { _VehicleNo = value; }
        }
        private string _VehicleNo = null;
        #endregion

        #region Property <string> VehicleName
        [Property("VehicleName", 100, SqlDbType.NVarChar, false, false)]
        public string VehicleName
        {
            get { return _VehicleName; }
            set { _VehicleName = value; }
        }
        private string _VehicleName = null;
        #endregion

        #region Property <int> SeatsCount
        [Property("SeatsCount", 4, SqlDbType.Int, false, false)]
        public int SeatsCount
        {
            get { return _SeatsCount; }
            set { _SeatsCount = value; }
        }
        private int _SeatsCount = int.MinValue;
        #endregion

        #region Property <string> Picture
        [Property("Picture", 100, SqlDbType.NVarChar, false, false)]
        public string Picture
        {
            get { return _Picture; }
            set { _Picture = value; }
        }
        private string _Picture = null;
        #endregion

        #region Property <string> Conservator
        [Property("Conservator", 40, SqlDbType.NVarChar, false, false)]
        public string Conservator
        {
            get { return _Conservator; }
            set { _Conservator = value; }
        }
        private string _Conservator = null;
        #endregion

        #region Property <string> ConservatorName
        [Property("ConservatorName", 100, SqlDbType.NVarChar, false, false)]
        public string ConservatorName
        {
            get { return _ConservatorName; }
            set { _ConservatorName = value; }
        }
        private string _ConservatorName = null;
        #endregion

        #region Property <string> Description
        [Property("Description", 1000, SqlDbType.NVarChar, false, false)]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
        private string _Description = null;
        #endregion

        #region Property <string> Flag
        [Property("Flag", 1, SqlDbType.Char, false, false)]
        public string Flag
        {
            get { return _Flag; }
            set { _Flag = value; }
        }
        private string _Flag = null;
        #endregion

        #region Property <string> UseDateCN
        [Property("UseDateCN", 96, SqlDbType.NVarChar, false, false)]
        public string UseDateCN
        {
            get { return _UseDateCN; }
            set { _UseDateCN = value; }
        }
        private string _UseDateCN = null;
        #endregion

        #region Property <string> VehicleTypeCN
        [Property("VehicleTypeCN", 100, SqlDbType.NVarChar, false, false)]
        public string VehicleTypeCN
        {
            get { return _VehicleTypeCN; }
            set { _VehicleTypeCN = value; }
        }
        private string _VehicleTypeCN = null;
        #endregion

        #region Property <string> VehicleFlagCN
        [Property("VehicleFlagCN", 100, SqlDbType.NVarChar, false, false)]
        public string VehicleFlagCN
        {
            get { return _VehicleFlagCN; }
            set { _VehicleFlagCN = value; }
        }
        private string _VehicleFlagCN = null;
        #endregion

        #region Property <string> StatusCN
        [Property("StatusCN", 100, SqlDbType.NVarChar, false, false)]
        public string StatusCN
        {
            get { return _StatusCN; }
            set { _StatusCN = value; }
        }
        private string _StatusCN = null;
        #endregion

        #region Property <string> DriverName
        [Property("DriverName", 40, SqlDbType.NVarChar, false, false)]
        public string DriverName
        {
            get { return _DriverName; }
            set { _DriverName = value; }
        }
        private string _DriverName = null;
        #endregion

        #region Property <string> StartAddress
        [Property("StartAddress", 100, SqlDbType.NVarChar, false, false)]
        public string StartAddress
        {
            get { return _StartAddress; }
            set { _StartAddress = value; }
        }
        private string _StartAddress = null;
        #endregion

        #region Property <string> Lxr
        [Property("Lxr", 100, SqlDbType.NVarChar, false, false)]
        public string Lxr
        {
            get { return _Lxr; }
            set { _Lxr = value; }
        }
        private string _Lxr = null;
        #endregion

        #region Property <string> Lxfs
        [Property("Lxfs", 200, SqlDbType.NVarChar, false, false)]
        public string Lxfs
        {
            get { return _Lxfs; }
            set { _Lxfs = value; }
        }
        private string _Lxfs = null;
        #endregion

        #region Property <string> Ch
        [Property("Ch", 100, SqlDbType.NVarChar, false, false)]
        public string Ch
        {
            get { return _Ch; }
            set { _Ch = value; }
        }
        private string _Ch = null;
        #endregion
        #endregion
    }
}
